package com.ruoyi.docdraw.service;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.docdraw.domain.*;
import com.ruoyi.docdraw.domain.subProject.SysSubProjectVo;
import com.ruoyi.docdraw.domain.supplier.SyncSupplierVo;
import com.ruoyi.docdraw.domain.vo.AIDrawingRespVo;
import com.ruoyi.docdraw.domain.vo.SyncReqVo;
import com.ruoyi.docdraw.vo.CheckDrawVersionVo;
import com.ruoyi.docdraw.vo.SysDocDrawRespVo;
import com.ruoyi.docdraw.vo.SysDocRespVo;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface ISysGDPService {


    /**
     * windchill 端推送文档相关信息处理方法
     * @param reqVo
     * @return
     */
    public List<AIDrawingRespVo> insertAndUpdate(SyncReqVo reqVo);

    /**
     * 文档历史 数据页面处理
     * @param sysDocMaster
     * @return
     */
    public List<SysDocRespVo> docMasterListProcessor(SysDocMaster sysDocMaster);

    /**
     * 图纸信息结果处理
     * @param sysDoc
     * @return
     */
    public List<SysDocDrawRespVo> docDrawListProcessor(SysDoc sysDoc);

    /**
     * 检查文档是否为最新版本
     * @param docOr
     * @return
     */
    public CheckDrawVersionVo checkDrawVersionByOr(String docOr, String deptId, SysUser user);


    /**
     * 当前用户最近五次扫码历史记录
     * @param username
     * @return
     */
    public List<AjaxResult> scanHistory(String username);



    /**
     * 下载图纸
     * @param sysDocDrawId
     * @return
     */
    public AjaxResult downloadDrawStr(Long sysDocDrawId, HttpServletResponse response, SysUser user) throws IOException;


    public void downloadDraw(Long sysDocDrawId, HttpServletResponse response, SysUser user) throws IOException;


    /**
     *  windchill向GDP推送供应商信息
     * @param reqVo
     * @return
     */
    public AjaxResult insertOrUpdateSupplier(SyncSupplierVo reqVo,String name);



    /**
     *  windchill向GDP推送删除供应商信息
     * @param reqVo
     * @return
     */
    public AjaxResult deleteSupplierFromPTC(SyncSupplierVo reqVo);


    /**
     * 根据当前登录用户的 组织 获取向对应的项目集合
     * @param sysProject
     * @param user
     * @return
     */
    public List<SysProject> getProject(SysProject sysProject, SysUser user);


    /**
     * 根据当前登录用户获取项目子项目信息
     * @param sysSubProject
     * @param user
     * @return
     */
    public List<SysSubProject> getSubProject(SysSubProject sysSubProject, SysUser user);


    /**
     * 将sysSubProject 对象转换成SysSubProjectVo
     * @param sysSubProject
     * @return
     */
    public SysSubProjectVo getSysSubProjectVo(SysSubProject sysSubProject);

    /**
     * 暂停所有子项目
     * @param projectId
     * @return
     */
    public int pauseSubProject(Long projectId);
}
